<?php
$v_status = 1;
$v_filter = "";
if(isset($_REQUEST['hdn_filter'])){
	$v_filter=_replace_bad_char(trim($_REQUEST['hdn_filter']));
}	
if(_is_sqlserver()){
/*	$cmd = @mssql_init("ONEGATE_WorktypeGetAll", $conn);
	@mssql_bind($cmd, "@p_status", $v_status, SQLINT4);
	@mssql_bind($cmd, "@p_filter", $v_filter, SQLVARCHAR);
	$result_all_worktype = @mssql_execute($cmd);
	// Luu so ban ghi
	$v_count = @mssql_num_rows($result_all_worktype);
	$arr_all_worktype = _get_row_to_array($result_all_worktype);
	@mssql_free_result($arr_all_worktype);*/
	
	$sql = "Exec ONEGATE_WorktypeGetAll  ";
	$sql = $sql . $v_status.",";
	$sql = $sql ."'". $v_filter."'";
	$ado_conn->SetFetchMode(ADODB_FETCH_NUMBER);
	$arr_all_worktype = $ado_conn->GetAll($sql);
	$v_count = sizeof ($arr_all_worktype);
}?>
